package org.gruposp2p.dnie.client.ui.panel;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import org.gruposp2p.dnie.client.ui.widget.dynatable.MostSignedDocumentsWidget;

public class MostSignedDocumentsPanel extends Composite {

    private static MostSearchedDocumentsPanelUiBinder uiBinder = GWT
                    .create(MostSearchedDocumentsPanelUiBinder.class);

    interface MostSearchedDocumentsPanelUiBinder extends
            UiBinder<Widget, MostSignedDocumentsPanel> {}

    @UiField VerticalPanel contentPanel;
    MostSignedDocumentsWidget mostSignedDocuments;

    public MostSignedDocumentsPanel() {
        initWidget(uiBinder.createAndBindUi(this));
        contentPanel.setWidth("991px");
    }

    public MostSignedDocumentsPanel getInstance () {
        if (mostSignedDocuments == null) {
            mostSignedDocuments = new MostSignedDocumentsWidget(10);
            contentPanel.add(mostSignedDocuments);
        }
        return this;
    }

}